package me.ratel.demo.wechat.entities;

import me.ratel.demo.eBook.infrastructure.utils.XmlUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
 * @author Administrator
 * @time 2016/8/28 15:47
 */
@XmlRootElement(name = "xml")
public class PayNotificationRequest {
    private static final Logger log = LoggerFactory.getLogger(PayNotificationRequest.class);

    @XmlElement(name = "return_code")
    @XmlJavaTypeAdapter(value = AdaptorCDATA.class)
    private String returnCode;

    @XmlElement(name = "return_msg")
    @XmlJavaTypeAdapter(value = AdaptorCDATA.class)
    private String returnMsg;

    public PayNotificationRequest() {

    }

    public String getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(String returnCode) {
        this.returnCode = returnCode;
    }

    public PayNotificationRequest setReturnCodeFluent(String returnCode) {
        setReturnCode(returnCode);
        return this;
    }

    public String getReturnMsg() {
        return returnMsg;
    }

    public void setReturnMsg(String returnMsg) {
        this.returnMsg = returnMsg;
    }

    public PayNotificationRequest setReturnMsgFluent(String returnMsg) {
        setReturnMsg(returnMsg);
        return this;
    }

    public String toXML() {
        return XmlUtils.toXML(this);
    }
}
